<template>
     <div class="style1">
        <h2>班级名字：{{name}}</h2>
        <h2>班级人数：{{count}}</h2>
        <button @click="showInfo()">显示班级信息</button><br/>
        <button @click="sendName()">发送班级名字</button><br/>
    </div>
</template>

<script>
    export default {
        name: 'Banji',
        props: ['name', 'count'],
        data() {
            return {
                
            }
        },
        methods: {
            sendName() {
                this.$bus.$emit('updateBanjiName', this.name)
            }
        }
    }
</script>

<style>
    .style1{
        background-color: green;
    }
</style>